﻿using System;

namespace XStudio.XCRF.Data.Business.Permissions
{
    /// <summary>
    /// 指定默认权限为允许或禁止
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
    public class DefaultPermissionAttribute : BasePermissionAttribute
    {
        /// <summary>
        /// 指定默认权限为允许或禁止
        /// </summary>
        /// <param name="type">类型，允许或禁止</param>
        public DefaultPermissionAttribute(PermissionType type)
        {
            _PermissionType = type;
        }

        /// <summary>
        /// 默认权限类型
        /// </summary>
        private PermissionType _PermissionType;
        /// <summary>
        /// 获取默认权限类型
        /// </summary>
        public PermissionType PermissionType { get { return _PermissionType; } }
    }
}
